package com.atguigu.array;

public class Student {
    //实例变量
    private String name;//姓名
    private int score;//成绩

    //无参构造
    public Student() {
    }
    //有参构造
    public Student(String name, int score) {
        this.name = name;
        this.score = score;
    }

    //get/set方法
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getScore() {
        return score;
    }

    public void setScore(int score) {
        this.score = score;
    }

    //其他方法
    public String display(){
        return "姓名：" + name +"，成绩：" + score;
    }
}
